import Vue from 'vue';
import Router from 'vue-router';
//  布局
import layout from '@/view/layout/index.vue';
//  首页
import index from '@/view/home/index.vue';

Vue.use(Router);

export default new Router({
    mode: 'history',
    routes: [
        {
            //  布局
            path: '/',
            name: 'layout',
            component: layout,
            redirect: 'index',
            children: [
                //  首页
                {
                    path: 'index',
                    name: 'index',
                    component: index
                }
            ]
        }
    ]
});
